 #字符串序列.replace(I旧子串，新子串，替换次数)
 #注意：替换次数如果查出子串出现次数，则替换次数为该子串出现次数
# mystr1 = "hello world and itcast and it and Python"
# #replace:替换字符串序列名.replace(旧子串，新子串，替换次数)
# newstr = mystr1.replace('and','migi')#替换次数默认所有
# print(newstr)

mystr = "hello world aNd icast and it and Python"
#capitalize()字符串首字母大写
newstr = mystr.capitalize()
print(newstr)
#title()将字符串中每个单词首字母都转换成大写
newstr1 = mystr.title()
print(newstr1)
#Lower大写转小写
newstr2 = mystr.lower()
print(newstr2)
#upper小写转大写
newstr3 = mystr.upper()
print(newstr3)


